package com.it.zhangjun.effective;

/**
 * TODO
 *
 * @author jun.zhang6
 * @date 2021/4/12
 */
public class Generic<T> {
    public static void main(String[] args) {
        Generic<Integer> gInteger = new Generic<>();
        Generic<Number> gNumber = new Generic<>();
        showKeyValue1(gInteger);
    }

    public static void showKeyValue1(Generic<?> obj) {
    }

    public <T> T genericMethod(Class<T> tClass) throws IllegalAccessException, InstantiationException {
        T instance = tClass.newInstance();
        return instance;
    }
}
